import json as p

db={123:456,'aaa':567}
with open(r'F:\ruru.data','wb') as f:
    p.dump(db,f)

with open(r'F:\ruru.data','rb') as f:
    da=p.load(f)
    print(da)

